﻿{extend name='public/base'/}
{block name='header'}{/block}
{block name='menu'}{/block}
{block name='seo'}
<title>{$title|default="标题"}</title>
<meta name="keywords" content="{$keywords|default='关键字'}">
<meta name="description" content="{$desc|default='描述'}">
{/block}

{block name='content'}
<form action="" method="post" class="form form-horizontal" id="form-student-edit">
<article class="cl pd-20">

    <form class="Hui-article">
        <article class="cl pd-20">

            <table class="table table-border table-bordered table-bg mt-20">

                <thead>
                <tr>
                    <th colspan="2" scope="col">环信信息</th>
                </tr>
                </thead>

                <tbody>
                <tr>
                    <th width="30%">client_id</th>
                    <td><span id="lbServerName"><input style="border:#FFFFFF 2px;width:500px;" name="client_id" value="{$att.client_id}"/></span></td>
                </tr>
                <tr>
                    <td>client_secret</td>
                    <td><input style="border:#FFFFFF 2px;width:500px;" name="client_secret" value="{$att.client_secret}"/></td>
                </tr>
                <tr>
                    <td>org_name</td>
                    <td><input style="border:#FFFFFF 2px;width:500px;" name="org_name" value="{$att.org_name}"/></td>
                </tr>
                <tr>
                    <td>app_name </td>
                    <td><input style="border:#FFFFFF 2px;width:500px;" name="app_name" value="{$att.app_name}"/></td>
                </tr>

                <tr>
                    <td>access_token </td>
                    <td><input style="border:#FFFFFF 2px;width:500px;" name="access_token" value="{$att.access_token}"/></td>
                </tr>
                <tr>
                    <td>expires_in</td>
                    <td><input style="border:#FFFFFF 2px;width:500px;" disabled name="access_token" value="{$att.expires_in}"/></td>
                </tr>
                <tr>
                    <td>application</td>
                    <td><input style="border:#FFFFFF 2px;width:500px;" disabled name="access_token" value="{$att.application}"/></td>
                </tr>
                <tr>
                    <td>更新时间</td>
                    <td><input style="border:#FFFFFF 2px;width:500px;" disabled name="access_token" value="{$attDate}"/></td>
                </tr>
                </tbody>

            </table>
            <div class="cl pd-5 bg-1 bk-gray mt-20">
				<span class="l">
					<input class="btn btn-primary radius " type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;" id="submit" >
				</span>
            </div>
        </article>
    </form>
{/block}

{block name='js'}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__STATIC__/admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="__STATIC__/admin/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="__STATIC__/admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>




<script>

    $(function(){

        //ajax方式提交当前表单数据
        $("#submit").on("click", function(event){

            $.ajax({
                type: "POST",
                url: "{:url('Admintoken/token_edits')}",
                data: $("#form-student-edit").serialize(),
                dataType: "json",
                success: function(data){
                    if (data.status == 1) {
                        alert(data.message);
                        window.parent.location.reload();
                        parent.layer.close(index);

                    } else {
                        alert(data.message);

                    }
                }
            });

        })

    })
</script>
{/block}

</body>
</html>